#!/bin/bash

mvn clean package -DskipTests

install_webssh(){
docker stop webssh01 && \
docker rm webssh01 && \
docker rmi webssh:0.0.1 && \
docker build . -t webssh:0.0.1 &&  \
docker run -m 512M --network xxljob \
  -d -p 8088:8080 --restart=on-failure:3 \
  --env PARAMS=-Dserver.servlet.context-path=/webssh-server \
  --name webssh01 webssh:0.0.1
}

export -f install_webssh 

nohup bash -c  install_webssh &

tail -f nohup.out
